<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>-loading</title>
<meta name="viewport" content="initial-scale=1, width=device-width, maximum-scale=1, user-scalable=no">
<script src="../kq.1.06.dev.js"></script>
<style>
.loading{
    width: 120px;
    height: 120px;
    display: block;
    margin: 10vh;
    position: relative;
    animation: moveover 3s linear infinite;
}
.loading .loading-before{
	width: 50%;
	height: 100%;
	position: absolute;
	left: 0;
	background-image: linear-gradient(#999,#d0cfcf);
	border-radius: 60px 0 0 60px;
	box-sizing: border-box;
	display: block;
	z-index: 2;
	background-color: red;
}
.loading .loading-after{
	width: 50%;
	height: 100%;
	position: absolute;
	right: 0;
	background-image: linear-gradient(#fff,#d0cfcf);
	border-radius: 0 60px 60px 0;
	box-sizing: border-box;
	display: block;
	z-index: 2;
}
.loading .loading-box{
    position: absolute;
    width: 100px;
    height: 100px;
    border-radius: 50%;
    left: 10px;
    top: 10px;
    background-color: #fff;
    z-index: 2;
}
</style>
</head>

<body>
<button id="loadingNormal">展示loading</button>
<button id="loadingNormal2">展示loading2</button>
<button id="cardNormal">展示卡片</button>
<button id="promptNormal">prompt展示</button>
<button id="comfirmNormal">comfirm展示</button>
<button id="alertNormal">alert展示</button>
<button id="msgNormal">msg展示</button>
<button id="loadpageNormal">加载页面</button>
<button id="proxySec">分片请求</button>
<button id="loading-gx">国学大会loading</button>
<!--<div>
	<div class="loading">
    	<div class="loading-before"></div>
        <div class="loading-after"></div>
        <div class="loading-box"></div>
    </div>
</div>-->
<button id="showImg">
展示图片查看
</button>
<button id="custom-card1">自定义卡片1</button>
<button id="custom-card2">自定义卡片2</button>
</body>
<script>
$Q('#loadingNormal').click(function(){
	$Q.loading();
	setTimeout(function(){
		$Q.loading(false);
		},2500000);
})
$Q('#loadingNormal2').click(function(){
	$Q.config('LOADING_IMG','http://asset.kuoqps.com/img/loading2.png');
	$Q.config('LOADING_IMG_PROTATE','30');
	$Q.loading();	
	setTimeout(function(){
		$Q.loading(false);
		},10000);
})
$Q('#cardNormal').click(function(){
	console.log($Q.card());
})
$Q('#promptNormal').click(function(){
	console.log($Q.prompt({
		text:"请输入待补全的数据",
		type:'textarea'	
	}));
})
$Q('#comfirmNormal').click(function(){
	console.log($Q.confirm({
		text:'确定执行当前操作？',
	}));
})
$Q('#alertNormal').click(function(){
	console.log($Q.alert({
		text:'警告，警告，你这个操作只有一个确定按钮！！！',	
	}));
})
$Q('#msgNormal').click(function(){
	console.log($Q.msg("常规测试"));
})
$Q('#loadpageNormal').click(function(){
	$Q.prompt({
		text:'请输入打开的url链接',
		value:'./_page.html',
		sure:function(url){
			$Q.loadpage(url);
		}	
	});
})

//分片请求
$Q('#proxySec').click(function(){
	$Q.ajax({
		url:'',
		type:'get',
		dataType:'',
		isSec:true,//是否为分段请求
		secCheck:function(rs,yes_back,err_back){console.log(this);return true;},//执行成功或者失败的判定
		success:function(){},
		error:function(){},
	})
})
$Q('#loading-gx').click(function(){
	$Q.config('LOADING_IMG','https://chuanjiafeng.oss-cn-hangzhou.aliyuncs.com/000/images/guoxue_loading.png');
	$Q.config('LOADING_IMG_PROTATE',3);
	$Q.config('LOADING_SCALE','routeY');
	$Q.config('LOADING_TIMER',10);
	$Q.loading();	
	setTimeout(function(){
		$Q.loading(false);
		},1000000);
	console.log(222);	
});
$Q('#showImg').click(function(){
	var url = 'http://wxrijiafeng.oss-cn-hangzhou.aliyuncs.com/000/live/secity/%E9%87%8D%E5%BA%86%E8%B5%9B%E5%8C%BA%E5%A4%8D%E5%86%B3%E8%B5%9B/301/after/forward/1/group/d15cd9e2f9d2c040ef0cb394f87cb6d5.jpg';
	$Q.showimg(url);
});
</script>
</html>
